using System;
using System.ComponentModel.DataAnnotations;
using Framework.SqlDataAccess.Model;

namespace Kaysite.Model
{
    public class Advice : KaysiteModel
    {
        [DBMaping(PrimaryKey = true)]
        [Required]
        public int AdviceID { get; set; }

        [DBMaping]
        [Required]
        public eAdviceStatus StatusID { get; set; }

        [DBMaping]
        [Required]
        public DateTime QuestionDate { get; set; }

        [DBMaping]
        [Required]
        [StringLength(256)]
        public string RequestorName { get; set; }

        [DBMaping]
        [Required]
        [StringLength(256)]
        public string RequestorEmail { get; set; }

        [DBMaping]
        [Required]
        [StringLength(6000)]
        [DBFieldInfo(IsName = true)]
        public string Question { get; set; }

        [DBMaping]
        [Required]
        public int UserID { get; set; }

        [DBMaping]
        [StringLength(6000)]
        public string Answer { get; set; }

        [DBMaping]
        public DateTime? AnswerDate { get; set; }

        public string Answerer { get; set; }

        public Advice()
        {
            StatusID = eAdviceStatus.New;
        }
    }
}